<script setup>
import { useCounterStore } from '@/stores/counter'

const counter = useCounterStore()
</script>

<template>
  <!-- 直接从 store 中访问 state -->
  <div>Current Count: {{ counter.count }}</div>
  <div>
    {{ counter.count }} | {{ counter.doubleCount }}
    <div class="btn btn-primary btn-sm" @click="counter.increment">count+1</div>
  </div>
</template>